HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpprotonperinggit/wp-content/plugins/wp-cardealer/templates/single-listing/video.php
<?php

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
global $post;

$meta_obj = WP_CarDealer_Listing_Meta::get_instance($post->ID);

$video = $meta_obj->get_post_meta('video');
?>
<?php if ( ! empty( $video ) ) : ?>
	<div class="listing-section listing-video">
		<h3><?php echo esc_html__( 'Video', 'wp-cardealer' ); ?></h3>
		<div class="video-embed-wrapper">
			<?php
			if ( strpos($video, 'www.aparat.com') !== false ) {
			    $path = parse_url($video, PHP_URL_PATH);
				$matches = preg_split("/\/v\//", $path);
				
				if ( !empty($matches[1]) ) {
				    $output = '<iframe src="http://www.aparat.com/video/video/embed/videohash/'. $matches[1] . '/vt/frame"
				                allowFullScreen="true"
				                webkitallowfullscreen="true"
				                mozallowfullscreen="true"
				                height="720"
				                width="1280" >
				                </iframe>';

				    echo $output;
				}
		   	} else {
				echo apply_filters( 'the_content', '[embed width="1280" height="720"]' . esc_attr( $video ) . '[/embed]' );
			}

			?>
		</div>

		<?php do_action('wp-cardealer-single-listing-video', $post); ?>
	</div>
<?php endif; ?>